package com.xjtu.shopcar.servlet;

import java.io.IOException;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.xjtu.shopcar.domin.Book;
import com.xjtu.shopcar.service.BookService;


/**
 * Servlet implementation class BookServlet
 */
public class BookServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	BookService  bookService = new BookService();
	Map<String, Book> bookList = bookService.findbookList();
	request.setAttribute("bookList", bookList);	
	request.getRequestDispatcher("/view/showbook.jsp").forward(request, response);
	
	
	}

}
